package com.cykj.admin.controller;

import com.cykj.admin.annotation.MyLog;
import com.cykj.admin.service.ICompanyService;
import com.cykj.admin.vo.CompanyVO;
import com.cykj.common.dto.ResponseDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject:@BelonqsPackage:com.cykj.admin.controller
 * @Author:jiangna
 * @CreateTime:2025-08-26 15:04
 */
@Tag(name = "CompanyController",description = "对公司的操作的接口")
@RestController
@RequestMapping("/company")
public class CompanyController {
    @Autowired
    private ICompanyService companyService;

    /**
    * @Description: 查询所有的企业信息 / 有条件查询
    * @Param: [companyVO]
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @Operation(summary = "平台端查询所有的企业信息的接口")
    @GetMapping("/selectAllCompanyInfo")
    public ResponseDTO selectAllCompanyInfo(CompanyVO companyVO) {
        return companyService.selectAllCompanyInfo(companyVO);
    }

    /**
    * @Description: 修改企业的信息
    * @Param: [companyVO]
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @MyLog("修改企业信息")
    @Operation(summary = "平台端修改企业的信息的接口")
    @PutMapping("updateByCompany")
    public ResponseDTO updateByCompany(@RequestBody CompanyVO companyVO) {
        return companyService.updateByCompany(companyVO);
    }

}
